import Loading from "./Loading.vue";
import Vue from "vue";

let LoadingContructor = Vue.extend(Loading);
let instance = null;
const serve = ()=>{
  console.log('loading被调用')
  if(!instance){
    instance = new LoadingContructor();
  }
  instance.loadingCount++;
  console.log(instance.loadingCount)
  instance.$mount(document.createElement("div"));
  document.body.appendChild(instance.$el);
  instance.show = true;
  return instance;
}

export default serve;
